*********************************************************************************
* Ergebnisse zum Abschnitt "Bekanntheit der NSS"								*
*********************************************************************************

* Project: 	Sonderheft ZfP
* Authors: 	Matthias Mader
* Date:		Jan 2025

* Data: secEUrity Project, IPSOS supplementary survey 2024

*********************************************************************************

*** Setup
	clear
	set more off            						// Disable partitioned output
	set dp period									// Use comma instead of dot for decimals
	set linesize 80         						// Line size limit to make output more readable
	macro drop _all         						// clear all macros
	set scheme burd, permanent						// set graph scheme, e.g., cleanplots, plottig, plotplainblind, burd3, s1mono
	graph set window fontface "Times New Roman"		// set font in graphs | "Arial" | "Times New Roman"


*** Open clean data set
	use DATA_clean, clear


*** Abbildung 1

*** Balkendiagramm: Kenntnis der NSS
	fre QU20_f
	recode QU20_f (1 2 3 = 0 "Insgesamt") (. = 1 "xxx"), gen(QU20_x)	

	graph bar QU20_d3a QU20_d3b QU20_d3c , over(QU20_x) ///
			name(g1, replace) ///
			ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%") ///
			title("Haben Sie schon einmal etwas von der Nationalen Sicherheitsstrategie" "Deutschlands gehört oder gelesen?", span size(medlarge)) ///
			legend(off) ///
			bar(3, color(gs8)) ///
			yline(.1, lstyle(solid color(gs14))) ///
			yline(.2, lstyle(solid color(gs14))) ///
			yline(.3, lstyle(solid color(gs14))) ///
			yline(.4, lstyle(solid color(gs14))) ///
			yline(.5, lstyle(solid color(gs14)))  /// 
			yline(.6, lstyle(solid color(gs14))) ///
			text(0.33 10 "Ja (31%)", color(33 102 172)) ///
			text(0.495 25 "Nein (47%)", color(178 24 43)) ///
			text(0.27 38.5 "Weiß", color(gs8)) ///
			text(0.24 39.5 "nicht (22%)", color(gs8))

	tab QU20_f pint_d1 , col nof
	graph bar QU20_d3a QU20_d3b QU20_d3c , over(pint_d1) ///
			name(g2, replace) ///
			legend(off) ///
			ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%") ///
			title("Haben Sie schon einmal etwas von der Nationalen Sicherheitsstrategie" "Deutschlands gehört oder gelesen?", span size(medlarge)) ///
			legend(off) ///
			bar(3, color(gs8)) ///
			yline(.1, lstyle(solid color(gs14))) ///
			yline(.2, lstyle(solid color(gs14))) ///
			yline(.3, lstyle(solid color(gs14))) ///
			yline(.4, lstyle(solid color(gs14))) ///
			yline(.5, lstyle(solid color(gs14)))  /// 
			yline(.6, lstyle(solid color(gs14))) ///
			text(0.19 10 "Ja (17%)", color(33 102 172)) ///
			text(0.59 25 "Nein (57%)", color(178 24 43)) ///
			text(0.31 38.5 "Weiß", color(gs8)) ///
			text(0.28 39.5 "nicht (26%)", color(gs8)) ///
			text(0.41 61.2 "Ja (39%)", color(33 102 172)) ///
			text(0.44 77 "Nein (42%)", color(178 24 43)) ///
			text(0.24 91 "Weiß", color(gs8)) ///
			text(0.21 91.5 "nicht (19%)", color(gs8))

	*Teilabbildungen  müssen händisch mit kombiniert werden.


*** NICHT GEZEIGT, NUR GESCHRIEBEN:
*** Balkendiagramm: Formale Bildung 
	graph bar QU20_d3a QU20_d3b QU20_d3c , over(QU20_x) ///
			name(g1, replace) ///
			ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%") ///
			title("Haben Sie schon einmal etwas von der Nationalen Sicherheitsstrategie" "Deutschlands gehört oder gelesen?", span size(medlarge)) ///
			legend(off) ///
			bar(3, color(gs8)) ///
			yline(.1, lstyle(solid color(gs14))) ///
			yline(.2, lstyle(solid color(gs14))) ///
			yline(.3, lstyle(solid color(gs14))) ///
			yline(.4, lstyle(solid color(gs14))) ///
			yline(.5, lstyle(solid color(gs14)))  /// 
			yline(.6, lstyle(solid color(gs14))) ///
			text(0.33 10 "Ja (31%)", color(33 102 172)) ///
			text(0.495 25 "Nein (47%)", color(178 24 43)) ///
			text(0.27 38.5 "Weiß", color(gs8)) ///
			text(0.24 39.5 "nicht (22%)", color(gs8))

	tab QU20_f edu_cat1 , col nof
	graph bar QU20_d3a QU20_d3b QU20_d3c , over(edu_cat1) ///
			name(g2, replace) ///
			legend(off) ///
			ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%") ///
			title("Haben Sie schon einmal etwas von der Nationalen Sicherheitsstrategie" "Deutschlands gehört oder gelesen?", span size(medlarge)) ///
			legend(off) ///
			bar(3, color(gs8)) ///
			yline(.1, lstyle(solid color(gs14))) ///
			yline(.2, lstyle(solid color(gs14))) ///
			yline(.3, lstyle(solid color(gs14))) ///
			yline(.4, lstyle(solid color(gs14))) ///
			yline(.5, lstyle(solid color(gs14)))  /// 
			yline(.6, lstyle(solid color(gs14))) ///
			text(0.20 10 "Ja (18%)", color(33 102 172)) ///
			text(0.555 25 "Nein (54%)", color(178 24 43)) ///
			text(0.33 38.5 "Weiß", color(gs8)) ///
			text(0.30 39.5 "nicht (28%)", color(gs8)) ///
			text(0.352 61.6 "Ja (33%)", color(33 102 172)) ///
			text(0.48 77 "Nein (46%)", color(178 24 43)) ///
			text(0.25 91 "Weiß", color(gs8)) ///
			text(0.22 91.5 "nicht (20%)", color(gs8))

